package com.yjd.comm.fs.service;

import java.util.List;
import java.util.Map;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.fs.model.FileGroupModel;
import com.yjd.comm.fs.model.FsFileModel;

public interface IFileGroupService extends IBaseService {
	/**
	 * 新增
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public FileGroupModel insert(FileGroupModel model) throws Exception;

	/**
	 * 根据文件服务id删除对象
	 * 
	 * @param idFsService
	 *            文件服务id
	 * @return
	 * @throws Exception
	 */
	public int delete(Long idFsService) throws Exception;

	/**
	 * 根据Map中的参数删除对象
	 * 
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	public int deleteByMap(Map<Object, Object> paramMap) throws Exception;

	/**
	 * 新增
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(FileGroupModel model) throws Exception;

	/**
	 * 保存文件，并将文件和组关联，如果指定的组不存在则新建
	 * 
	 * @param fsFileModels
	 * @param groupId
	 * @param cleanGroupFile
	 *            保存之前是否将组中关联的file都移除
	 * @return
	 * @throws Exception
	 */
	public FileGroupModel insert(List<FsFileModel> fsFileModels,
			Long idFileGroup, Boolean cleanGroupFile) throws Exception;
}
